const router = require("@koa/router")()
const category = require("./admin/category")
const user = require("./admin/user")
const auth = require("../middleware/auth")
const resource = require("../middleware/resource")
router.get("/", async (ctx) => {
  ctx.body = "欢迎来到后台用户模块"
})
router.use("/user", user.routes())
router.use("/rest/:resource", auth(), resource(), category.routes())

module.exports = router